package com.jtjrenren.android.taxi.driver.utils;

import com.baidu.mapapi.map.BaiduMap;
import com.baidu.mapapi.map.BitmapDescriptor;
import com.baidu.mapapi.map.BitmapDescriptorFactory;
import com.jtjrenren.android.taxi.driver.R;

/**
 * Created by Administrator on 2016/8/29.
 */

public class MyDrivingRouteOverlay extends DrivingRouteOverlay {
    public static final int TYPE_QJK = 0;
    public static final int TYPE_SC = 1;

    private int type = TYPE_QJK;

    public MyDrivingRouteOverlay(BaiduMap baiduMap) {
        super(baiduMap);
    }

    public void refrshType(int type) {
        this.type = type;
    }

    @Override
    public BitmapDescriptor getStartMarker() {
        if (type == TYPE_QJK) {
            return BitmapDescriptorFactory.fromResource(R.mipmap.def_transtant);
        } else if (type == TYPE_SC) {
            return BitmapDescriptorFactory.fromResource(R.mipmap.def_transtant);
        }
        return null;
    }

    @Override
    public BitmapDescriptor getTerminalMarker() {
        if (type == TYPE_QJK) {
            return BitmapDescriptorFactory.fromResource(R.mipmap.n_def_passger);
        } else if (type == TYPE_SC) {
            return BitmapDescriptorFactory.fromResource(R.mipmap.n_def_end_small);
        }
        return null;
    }
}